package actions;

import java.awt.event.ActionEvent;

import client_gui.ClientWindow;
import client_gui.UserDetailsDialog;
import client_tree.User;

public class DetailsUserAction extends RLMAbstractAction {

	
	public DetailsUserAction(ClientWindow owner) {
		setActionOwner(owner);
//		putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_F8, 0));
		putValue(SMALL_ICON, loadIcon("images/details.png"));
		putValue(NAME, "User Details");
		putValue(SHORT_DESCRIPTION, "Informacije o korisniku");
	}
	
	
	public void actionPerformed(ActionEvent e) {
		User user = getActionOwner().getSelectedUser();
		
		UserDetailsDialog userDetailsDialog = new UserDetailsDialog(getActionOwner(), user);
		userDetailsDialog.setVisible(true);
	}
	
}
